using System;
using System.Collections.Generic;
using Module.Common.Models;
using Module.Core.DAO;
using Module.Core.EntitiesInfo.TablesInfo;

namespace Module.Core.BusinessLogic
{
    public class CityBL
	{
		/// <summary>
		/// Saves a record to the City table.
		/// </summary>
		public virtual void Insert(CityInfo cityInfo)
		{
			try
			{
                new CityDAO().Insert(cityInfo);
			}
			catch (Exception ex)
			{
				throw;
			}

		}

		/// <summary>
		/// Saves a record to the City table.
		/// </summary>
		public virtual void Update(CityInfo cityInfo)
		{
			try
			{
                new CityDAO().Update(cityInfo);
			}
			catch (Exception ex)
			{
				throw;
			}

		}

		/// <summary>
		/// Delete a record from the City table.
		/// </summary>
		public virtual void Delete(int cityId)
		{
			try
			{
                new CityDAO().Delete(cityId);
			}
			catch (Exception ex)
			{
				throw;
			}

		}

		/// <summary>
		/// Selects a single record from the City table.
		/// </summary>
		public virtual CityInfo Select(int cityId)
		{
			try
			{
                return new CityDAO().Select(cityId);
			}
			catch (Exception ex)
			{
				throw;
			}

		}
  
		/// <summary>
		/// Selects all records from the City table.
		/// </summary>
		public CHRTList<CityInfo> SelectAll()
		{
			try
			{
                return new CityDAO().SelectAll();
			}
			catch (Exception ex)
			{
				throw;
			}

		}

	}
}
